Skip to content

feat: add Multiscale/proj/spatial conventions support#64

Draft
vincentsarago wants to merge 4 commits intomainfrom
feature/zarr-conventions
Draft

feat: add Multiscale/proj/spatial conventions support#64
vincentsarago wants to merge 4 commits intomainfrom
feature/zarr-conventions

Conversation

@vincentsarago
Copy link
Collaborator

@vincentsarago vincentsarago commented Jan 19, 2026

This PR updates the Reader to use (Geo) Zarr conventions

closes #53

)

def _get_groups(self) -> List[str]:
def _get_groups(self) -> list[str]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only keep Groups with GeoZarr conventions (spatial + proj)

dataset = tree.to_dataset()
transform = dataset.rio.transform()

bbox = array_bounds(width, height, transform) # type: ignore
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the conventions is super open we need to check in multiple places where to find either the bbox/shape/transform

f"Cannot determine MaxZoom for group {group}.",
UserWarning,
stacklevel=2,
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lot of duplication between both get_minzoom/get_maxzoom. We should refactor

@vincentsarago
Copy link
Collaborator Author

vincentsarago commented Jan 19, 2026

TODO:

  • create test dataset
  • update geozarr viewer
  • clarify the GeoZarr convention

@vincentsarago vincentsarago changed the title update reader to use Multiscale/proj/spatial conventions feat: Multiscale/proj/spatial conventions support Jan 22, 2026
@vincentsarago vincentsarago changed the title feat: Multiscale/proj/spatial conventions support feat: add Multiscale/proj/spatial conventions support Jan 22, 2026
@emmanuelmathot
Copy link
Contributor

@vincentsarago
Copy link
Collaborator Author

let's have a look at xarray-contrib/rasterix#68 to make sure we didn't miss anything

@emmanuelmathot
Copy link
Contributor

Don't we use rioxarray on our side? I hope my PR supporting zarr convetions should be merged soon: corteva/rioxarray#905

@vincentsarago
Copy link
Collaborator Author

@emmanuelmathot we do but I just want to make sure that we do the same as they are doing and that we are not missing anything in our analysis of the spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for multiscale Zarr conventions

2 participants